//
//  ViewController.m
//  ToolBallDemo
//
//  Created by SuperChao.liang on 2016/11/30.
//  Copyright © 2016年 com.qunar.iphoneclientdev. All rights reserved.
//

#import "ViewController.h"
#import "CallCenterManager.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UISwitch *mySwitch;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor orangeColor];
    [_mySwitch addTarget:self action:@selector(switchHandle) forControlEvents:UIControlEventValueChanged];
}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    // 一定要在原有window层初始化完成之后，再添加toolball
    [CallCenterManager show];
}
- (void)switchHandle
{
    if(self.mySwitch.on)
        [CallCenterManager show];
    else
        [CallCenterManager hide];
}



@end
